The proper functioning of a power grid requires continuous matching of supply and demand in the grid, in spite of the randomness of electric loads and the uncertainty of generation. To operate the grid reliably today, various “ancillary services” are used to compensate for the supply-demand imbalance. Examples of ancillary services are automatic generation control (AGC), contingency reserves, and the balancing reserves used in the U.S. Pacific Northwest.